package com.zhang.buiness.amaster.workserver.web;

import com.zhang.buiness.amaster.workserver.service.WorkServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/env")
public class WorkWebController {

    @Autowired
    private WorkServiceImpl workService;

    /**
     * 读取配置中的测试
     * @return
     */
    @RequestMapping("/get/env/all/v1")
    private List<String> getEnvConfig(){
      return  workService.getWorkEnvConfig();

    }

    @RequestMapping("/get/config/env/all/v1")
    private List<String> getConfigEnvConfig(){
        return  workService.getConfigEnvConfig();

    }

    @RequestMapping("/get/circuit/break/hystrix/test/v1")
    private List<String> getcircuitBreakHystrixTest(){
        return  workService.getcircuitBreakHystrixTest();
    }

    @RequestMapping("/get/timeout/break/hystrix/test/v1")
    private List<String> getTimeoutBreakHystrixTest(){
        return  workService.getTimeoutBreakHystrixTest();

    }

    @RequestMapping("/get/execution/thread/isolation_strategy/break/hystrix/test/v1")
    private List<String> getExecutionThreadIsolation_strategyHystrixTest(){
        return  workService.getExecutionThreadIsolation_strategyHystrixTest();

    }

    @RequestMapping("/get/execution/semaphore/isolation_strategy/break/hystrix/test/v1")
    private List<String> getSemaphoreIsolation_strategyHystrixTest(){
        return  workService.getSemaphoreIsolation_strategyHystrixTest();

    }



}
